package org.fioma.tree.suffixTree.memory.ukkonen;

import org.fioma.tree.suffixTree.memory.bytes.MemoryBytes;

public class SimpleUkkonenMemory extends MemoryBytes implements UkkonenMemory {

	protected long SUFFIX_LINK_POSITION = 31;

	public SimpleUkkonenMemory(long totalBytes) {
		super(totalBytes);
		INTERNAL_SIZE = 36;
	}

	@Override
	public long getSuffixLinkAddress(long pos) {
		return get5Bytes(pos + SUFFIX_LINK_POSITION);
	}

	@Override
	public void setSuffixLinkAddress(long pos, long suffixLinkAddress) {
		set5Bytes(pos + SUFFIX_LINK_POSITION, suffixLinkAddress);
	}

}
